<?
class Realestatecategory_model extends Model{	
	function Realestatecategory_model(){
		parent::Model();		
	}	
	function get_content(){		
		$this->db->select('id');
		$this->db->order_by('sortorder');
		$res = $this->db->get('realestate_category');
		$list = array();	
		foreach($res->result() as $value){
			$list[$value->id] = get_content('realestate_category',$value->id)->name;
		}			
		return $list;
	}
	function first_category(){
		$list = $this->get_content();
		foreach($list as $key=>$val) return $key;
		return '';
	}
}
/* End of file */